home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / ADA / GNAT / !gcc / adainc / 4 / ads / i-fortra < prev    next >
Text File  |  1996-02-12  |  3KB  |  63 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT COMPILER COMPONENTS                         --
  4. --                                                                          --
  5. --                   I N T E R F A C E S . F O R T R A N                    --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.8 $                              --
  10. --                                                                          --
  11. -- This specification is adapted from the Ada Reference Manual for use with --
  12. -- GNAT.  In accordance with the copyright of that document, you can freely --
  13. -- copy and modify this specification,  provided that if you redistribute a --
  14. -- modified version,  any changes that you have made are clearly indicated. --
  15. --                                                                          --
  16. ------------------------------------------------------------------------------
  17.  
  18. with Ada.Numerics.Generic_Complex_Types;
  19. pragma Elaborate_All (Ada.Numerics.Generic_Complex_Types);
  20.  
  21. package Interfaces.Fortran is
  22. pragma Pure (Fortran);
  23.  
  24.    type Fortran_Integer  is new Integer;
  25.    type Real             is new Float;
  26.    type Double_Precision is new Long_Float;
  27.  
  28.    type Logical is new Boolean;
  29.    for Logical'Size use Integer'Size;
  30.    --  As required by Fortran standard, stand alone logical allocates same
  31.    --  space as integer (but what about the array case???)
  32.  
  33.    package Single_Precision_Complex_Types is
  34.       new Ada.Numerics.Generic_Complex_Types (Real);
  35.  
  36.    type Complex is new Single_Precision_Complex_Types.Complex;
  37.  
  38.    type Imaginary is new Single_Precision_Complex_Types.Imaginary;
  39.    i : constant Imaginary := Imaginary (Single_Precision_Complex_Types.i);
  40.    j : constant Imaginary := Imaginary (Single_Precision_Complex_Types.j);
  41.  
  42.    type Character_Set is new Character;
  43.  
  44.    type Fortran_Character is array (Positive range <>) of Character_Set;
  45.  
  46.    function To_Fortran (Item : in Character)     return Character_Set;
  47.    function To_Ada     (Item : in Character_Set) return Character;
  48.  
  49.    function To_Fortran (Item : in String)            return Fortran_Character;
  50.    function To_Ada     (Item : in Fortran_Character) return String;
  51.  
  52.    procedure To_Fortran
  53.      (Item   : in String;
  54.       Target : out Fortran_Character;
  55.       Last   : out Natural);
  56.  
  57.    procedure To_Ada
  58.      (Item   : in Fortran_Character;
  59.       Target : out String;
  60.       Last   : out Natural);
  61.  
  62. end Interfaces.Fortran;
  63.